﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace iTunesFastForward
{
    class m3uCreator
    {

        public DirectoryInfo OutputDir { get; set; }

        public FileInfo CreatePlaylist(string name, string[] pathes)
        {
            string path = Path.Combine(OutputDir.FullName, name + ".m3u");
            StreamWriter fs = File.CreateText(path);

            foreach (var filePath in pathes)
                fs.WriteLine(filePath);

            fs.Close();
            return new FileInfo(path);
        }


    }
}
